package org.openarchitectureware.recipe2.findbugs.impl;

import java.util.LinkedHashMap;
import java.util.Map;

import org.openarchitectureware.recipe2.findbugs.PredefInstance;

public class PredefInstanceImpl implements PredefInstance {

	private String predef;
	private String message;
	private Map<String, String> parameters = new LinkedHashMap<String, String>();
	
	public void addParameter(String name, String value) {
		this.parameters.put(name, value);
	}
	
	/* (non-Javadoc)
	 * @see org.openarchitectureware.recipe2.findbugs.PredefInstance#getMessage()
	 */
	public String getMessage() {
		return message;
	}
	
	/* (non-Javadoc)
	 * @see org.openarchitectureware.recipe2.findbugs.PredefInstance#getParameter(java.lang.String)
	 */
	public String getParameter(String name) {
		return parameters.get(name);
	}
	
	/* (non-Javadoc)
	 * @see org.openarchitectureware.recipe2.findbugs.PredefInstance#getParameters()
	 */
	public Map<String, String> getParameters() {
		return parameters;
	}

	/* (non-Javadoc)
	 * @see org.openarchitectureware.recipe2.findbugs.PredefInstance#getPredef()
	 */
	public String getPredef() {
		return predef;
	}
	
	public void setMessage(String message) {
		this.message = message;
	}
	
	public void setPredef(String predef) {
		this.predef = predef;
	}
}
